.. / download
<?xml version='1.0'?>
<xsl:stylesheet version="1.1" xmlns:xsl="http://www.w3.org/1999/XSL/Transform"
  xmlns:fo="http://www.w3.org/1999/XSL/Format">

  <xsl:template match="para/caption | attentListItemPara/caption | warnAndCautionPara/caption | entry/caption">
     <xsl:choose>
       <xsl:when test="@color">
         <fo:inline>
            <xsl:choose>
              <xsl:when test="@color='co01'"><!--green-->
                <xsl:attribute name="background-color">#00FF00</xsl:attribute>
                <xsl:apply-templates/>
              </xsl:when>
              <xsl:when test="@color='co02'"><!--amber-->
                <xsl:attribute name="background-color">#FFCC00</xsl:attribute>
                <xsl:apply-templates/>
              </xsl:when>
              <xsl:when test="@color='co03'"><!--yellow-->
                <xsl:attribute name="background-color">#FFFF00</xsl:attribute>
                <xsl:apply-templates/>
              </xsl:when>
               <xsl:when test="@color='co04'"><!--red-->
                 <xsl:attribute name="background-color">#FF0000</xsl:attribute>
                 <xsl:apply-templates/>
               </xsl:when>
              <xsl:when test="@color='co07'"><!--white-->
                <xsl:attribute name="background-color">#FFFFFF</xsl:attribute>
                <xsl:apply-templates/>
              </xsl:when>
              <xsl:when test="@color='co09'"><!--clear-->
                <xsl:apply-templates/>
              </xsl:when>
            <xsl:otherwise>
              <fo:inline color="#FF0000">
                <xsl:text>Invalid color attribute</xsl:text>
              </fo:inline>
            </xsl:otherwise>
          </xsl:choose>
        </fo:inline>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <xsl:template
    match="para/caption/captionLine | attentListItemPara/caption/captionLine | warnAndCautionPara/caption/captionLine | entry/caption/captionLine">
    <xsl:apply-templates/>
  </xsl:template>


  <xsl:template match="emphasis">
    <xsl:choose>
      <xsl:when test="@emphasisType='em01'">
        <fo:inline font-weight="bold">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em02'">
        <fo:inline font-style="italic">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em03'">
        <fo:inline text-decoration="underline">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em04'">
        <fo:inline text-decoration="overline">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em05'">
        <fo:inline text-decoration="line-through">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em51'">
        <fo:inline font-variant="small-caps">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em52'">
        <fo:inline color="black" border-after-color="black" border-after-style="double"
          border-bottom-color="black" border-after-width="1pt">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em53'">
        <fo:inline text-transform="uppercase">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em54'">
        <fo:inline color="white" background-color="black">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:when test="@emphasisType='em55'">
        <fo:inline font-weight="bold" font-style="italic">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
    </xsl:choose>
  </xsl:template>
  <xsl:template match="inlineSignificantData">
    <xsl:choose>
      <xsl:when test="@significantParaDataType='psd55'">
        <fo:inline font-weight="bold" font-size="120%" color="white" background="black">
          <xsl:apply-templates/>
        </fo:inline>
      </xsl:when>
      <xsl:otherwise>
        <xsl:apply-templates/>
      </xsl:otherwise>
    </xsl:choose>
  </xsl:template>

  <!-- 3031 -  All dimensions, tolerances, clearances, measurements, and decimal equivalents appearing in Chapters 8 (refer to 5.115.1.15). and 9 (refer to 5.115.1.16). of an Operator’s manual shall be stated in bold capital lettering in the text and on illustrations.-->
  <!-- 3031 - Attribute values shall be used as defined in the following table.
    See TABLE XXIV (Attribute values – quantityType.) in the Attribute values Tables sheet.-->
  <xsl:template match="quantity">
    <fo:inline text-transform="uppercase">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="quantityGroup">
    <xsl:if test="@quantityUnitOfMeasure">
      <xsl:text> </xsl:text>
      <xsl:value-of select="@quantityUnitOfMeasure"/>      
    </xsl:if>
    <xsl:apply-templates/>
  </xsl:template>
  
  <xsl:template match="quantityValue">
    <fo:inline>
      <xsl:apply-templates/>
      <xsl:if test="@quantityUnitOfMeasure">
        <xsl:text> </xsl:text>
        <xsl:value-of select="@quantityUnitOfMeasure"/>
      </xsl:if>
    </fo:inline>
  </xsl:template>
  
  <xsl:template match="quantityTolerance">
    <fo:inline>
      <xsl:choose>
        <xsl:when test="@quantityToleranceType='plus'">
          <xsl:text>+</xsl:text>
        </xsl:when>
        <xsl:when test="@quantityToleranceType='plusorminus'">
          <xsl:text>±</xsl:text>
        </xsl:when>
        <xsl:when test="minus">
          <xsl:text>-</xsl:text>
        </xsl:when>
        <xsl:otherwise/>
      </xsl:choose>
      <xsl:apply-templates/>
      <xsl:if test="@quantityUnitOfMeasure">
        <xsl:text> </xsl:text>
        <xsl:value-of select="@quantityUnitOfMeasure"/>
      </xsl:if>
    </fo:inline>
  </xsl:template>
  <xsl:template match="name">
    <xsl:apply-templates/>
  </xsl:template>

  <!--s1000d_Iss_4_0_1_r1.pdf, Chapter 3.9.5.2.1.1, para 2.3.3 General rules for marking text as changed
  The element <changeInline> must be used for changed data modules when changing parts of text within certain elements 
  (eg paragraphs, titles etc) that contain the <changeInline> element.-->
  
  <!--s1000d_Iss_4_0_1_r1.pdf, Chapter 6.2.2 Page-oriented publications - Typography - Layout elements 
  para 2.13 Change marks
  para 2.13.1 General
  Change marks must show the changes from the previous issue delivered to the customer.
  Changes given the attribute changeMark is "1" can be identified with a change bar in the
  form of a vertical black line, 2 to 4 pt wide, to the left of the left type limit adjacent to the
  changed lines, or in the case of tabular data, against the row that contains the change.-->
  
  <xsl:template match="changeInline">
      <xsl:if test="@changeMark = 1">
        <xsl:call-template name="markChange">
          <xsl:with-param name="changeType" select="@changeType"/>
        </xsl:call-template>
      </xsl:if>
  </xsl:template>
  
  <xsl:template name="markChange">
    <xsl:param name="changeType">add</xsl:param>
    <fo:inline>
      <fo:change-bar-begin change-bar-style="solid" change-bar-color="black"
        change-bar-offset="8pt" change-bar-placement="left"/>
        <xsl:if test="$changeType!='delete'">
          <xsl:apply-templates/>
        </xsl:if>
      <fo:change-bar-end/>
    </fo:inline>
  </xsl:template>

  <xsl:template match="subScript">
    <fo:inline vertical-align="sub" font-size="80%">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>

  <xsl:template match="superScript">
    <fo:inline vertical-align="super" font-size="80%">
      <xsl:apply-templates/>
    </fo:inline>
  </xsl:template>
</xsl:stylesheet>

gopher://khzae.net/0/s1000d/links/projects/3031/Army S1000D Stylesheets/FO-3031-A00-USARMY-INLINE_001-00_EN-US.xsl
Styles: Light Dark Classic